package org.ezplatform.office.meeting.memo.dao;

import java.util.List;

import org.ezplatform.core.dao.jpa.JpaBaseDao;
import org.ezplatform.office.meeting.memo.entity.MemoInfo;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface MemoInfoDao extends JpaBaseDao<MemoInfo, String> {
    
	@Modifying
    @Query(value = "delete from MemoInfo m where m.applyRecordId in (?1)")
    int delByRecordId(String... recordIds);
	
	@Query(value = "select id from MemoInfo m where m.applyRecordId in (?1) ")
    List<String> findByRecordId(String... applyRecordId);
	
	@Query(value = "from MemoInfo m where m.applyRecordId=?1")
    List<MemoInfo> getMemoInfoByApplyRecordId(String applyRecordId);
	
	@Query(" from MemoInfo m where m.applyRecordId in (?1) ")
	List<MemoInfo> findMemoInfoByRecordId(String... applyRecordId);
}